<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="/css/main.css">
	<link rel="stylesheet" href="/css/font-awesome/css/font-awesome.css">
	<script src="/js/jQuery.js"></script>
</head>
<body>
<div class="box">

	<h3>编辑合同信息</h3>
	<form action="/contract/edit" method="post">
		<table class="form-table">

			<tr>
				<td>合同编号</td>
				<td colspan="3" class="control">
					<input type="hidden" name="lc_id" value="${lc.lc_id }">
					<input type="text" name="lc_contract_number" style="width: 260px;" placeholder="合同编号 " value="${lc.lc_contract_number}" readonly="readonly">
					<span style="color: red;">*不可修改</span>
				</td>
			</tr>
			<tr>
				<td>租户姓名</td>
				<td colspan="3" class="control">
					<input type="text" name="l_name" placeholder="租户姓名" style="width: 260px;"  value="${lc.l_name}" readonly="readonly">
					<span style="color: red;">*不可修改</span>
				</td>
			</tr>
			<tr>
				<td>房屋地址</td>
				<td colspan="3" class="control">
					<input type="text" name="h_address" placeholder="房屋地址" style="width: 260px;"  value="${lc.h_address}" readonly="readonly">
					<span style="color: red;">*不可修改</span>
				</td>
			</tr>
			<tr>
				<td>开始日期</td>
				<td colspan="3" class="control">
					<input type="date" name="lc_contract_start_date" value="<fmt:formatDate value="${lc.lc_contract_start_date}" pattern="yyyy-MM-dd" />">
				</td>
			</tr>
			<tr>
				<td>租住月数</td>
				<td colspan="3" class="control">
					<select name="lc_month"  style="width:260px;">
						<c:forEach begin="1" end="12" var="i" >
							<option value="${i}" ${i == lc.lc_month ? "selected" : ""}>${i}</option>
						</c:forEach>

					</select>
				</td>
			</tr>
			<tr>
				<td>月租</td>
				<td colspan="3" class="control">
					<input id="rent" type="text" name="lc_rent" onload="" value="${lc.lc_rent}">
				</td>
			</tr>

			<tr>
				<td>押金</td>
				<td colspan="3" class="control">
					<input type="text" name="lc_deposit" style="width: 260px;"  placeholder="押金" value="${lc.lc_deposit}">
				</td>
			</tr>
			<tr>
				<td>签署人</td>
				<td colspan="3" class="control">
					<input type="text" name="lc_contract_signer" style="width: 260px;"  placeholder="签署人" value="${lc.lc_contract_signer }">
				</td>
			</tr>
			<tr>
				<td>合同状态</td>
				<td colspan="3" class="control">
					<select name="lc_contract_state"  style="width:260px;">
						<option ${lc.lc_contract_state == "1" ? "selected" : "" } value="1">已失效</option>
						<option ${lc.lc_contract_state == "0" ? "selected" : "" } value="0">已生效</option>
					</select>
				</td>
			</tr>
		</table>

		<div class="buttons">
			<input class="btn btn-primary va-bottom" type="submit" value="保存">&nbsp;&nbsp;
			<a class="btn btn-default" href="javascript:history.go(-1)">返回</a>
		</div>
	</form>
</div>

</body>
</html>